import Mock from 'mockjs2'

// Mock.mock($api.system.rsa.publicKey, 'post', parameter => {
//   return {
//     success: true,
//     message: '操作成功',
//     data: '154rewrewrwwqwejlkjlk.sfdsere'
//   }
// })

// Mock.mock($api.permission.login.login, 'post', parameter => {
//   return {
//     success: true,
//     message: '操作成功',
//     data: {
//       token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE0MWU4YWZiLTBkZWQtNDc2MS1iNDVjLWRlOGFhZTk5MDcyYyJ9.Ac3YERYRtH2FlIgwND7mKWQFm-YZTU5nMqX0JwJrHF9jJ-mz6vqooWHzGlFQOzJuhgnlygkFY3ax5mAM0wrXHA'
//     }
//   }
// })

// Mock.mock(/\/getInfo/, 'get', parameter => {
//   return {
//     success: true,
//     message: '操作成功',
//     data: {
//       user: {
//         id: '1',
//         userName: 'admin',
//         nickName: '管理员',
//         phonenumber: '13809553820',
//         email: '',
//         sex: 1,
//         avatar: '/profile/avatar/2020/05/26/9e92b583bb420039dce199ed5c4886ce.jpeg',
//         password: '$2a$10$R9XL8zu1EWXd6XvJzD1UDuIgRsiASsjnJ/ZtLTOMhOzzTW.WMUa/K',
//         status: 0,
//         loginIp: '127.0.0.1',
//         loginDate: '2018-03-16 11:33:00',
//         remark: '管理员',
//         roleIds: null,
//         createBy: 'admin',
//         createTime: '2018-03-16 11:33:00',
//         updateBy: '1',
//         updateTime: '2020-05-27 10:05:59',
//         beginTime: null,
//         endTime: null
//       },
//       roles: ['admin'],
//       permissions: ['*:*:*']
//     }
//   }
// })

// Mock.mock(/\/getRouters/, 'get', parameter => {
//   return {
//     success: true,
//     message: '操作成功',
//     data: [{
//         name: 'System',
//         path: '/system',
//         hidden: false,
//         redirect: 'noRedirect',
//         components: {
//           'default': 'layouts/RouteView'
//         },
//         alwaysShow: true,
//         meta: {
//           title: '系统管理',
//           icon: 'setting'
//         },
//         children: [{
//           name: 'UserManage',
//           path: 'userManage',
//           hidden: false,
//           components: {
//             'default': 'layouts/RouteView',
//             'UserManage': 'system/userManage/UserManage'
//           },
//           meta: {
//             title: '用户管理',
//             icon: 'user'
//           }
//         }, {
//           name: 'RoleManage',
//           path: 'roleManage',
//           hidden: false,
//           components: {
//             'default': 'layouts/RouteView',
//             'RoleManage': 'system/roleManage/RoleManage'
//           },
//           meta: {
//             title: '角色管理',
//             icon: 'team'
//           }
//         }, {
//           name: 'MenuManage',
//           path: 'menuManage',
//           hidden: false,
//           components: {
//             'default': 'layouts/RouteView',
//             'MenuManage': 'system/menuManage/MenuManage'
//           },
//           meta: {
//             title: '菜单管理',
//             icon: 'menu'
//           }
//         }, {
//           name: 'Dict',
//           path: 'dict',
//           hidden: false,
//           components: {
//             'default': 'layouts/RouteView',
//             'Dict': 'system/dict/Dict'
//           },
//           meta: {
//             title: '数据字典',
//             icon: 'team'
//           }
//         }]
//       },
//       {
//         name: 'EnterpriseWorkTotalSituation',
//         path: '/enterpriseWorkTotalSituation',
//         hidden: false,
//         components: {
//           'default': 'layouts/RouteView'
//         },
//         meta: {
//           title: '企业用工总量情况',
//           icon: 'team'
//         },
//         children: [{
//           name: 'FullApertureWorkSituation',
//           path: 'fullApertureWorkSituation',
//           hidden: false,
//           components: {
//             'default': 'layouts/RouteView',
//             'FullApertureWorkSituation': 'enterpriseWork/fullApertureWorkSituation/FullApertureWorkSituation'
//           },
//           meta: {
//             title: '全口径用工情况',
//             icon: 'team'
//           }
//         }, {
//           name: 'YearFullApertureWorkSituation',
//           path: 'yearFullApertureWorkSituation',
//           hidden: false,
//           components: {
//             'default': 'layouts/RouteView',
//             'YearFullApertureWorkSituation': 'enterpriseWork/yearFullApertureWorkSituation/YearFullApertureWorkSituation'
//           },
//           meta: {
//             title: '历年全口径用工情况分析',
//             icon: 'team'
//           }
//         }]
//       },
//       {
//         name: 'Workbench',
//         path: '/workbench',
//         hidden: false,
//         components: {
//           'default': 'layouts/RouteView'
//         },
//         meta: {
//           title: '工作台',
//           icon: 'book'
//         },
//         children: [{
//           name: 'Question',
//           path: '/workbench',
//           hidden: false,
//           components: {
//             'default': 'layouts/RouteView',
//             'Question': 'workbench/Question'
//           },
//           meta: {
//             title: '问题处理',
//             icon: 'question'
//           }
//         }]
//       }
//     ]
//   }
// })

// 获取加密key

Mock.mock(/\/upms\/public-key/, 'get', parameter => {
  return { 'code': 200, 'data': 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWg7SUUCjQe2MrcfLypFhvEZfJW5ZuxxkhucvCtxOwEMdAxYSX/NOg0nrNeIxxcHtrQ5Gk2E/c/1ftku6y4aE3SGWT7oMFUGi7kERQ4xaZnMS7Xmb/8NuNSSeX8Vdzacf+uCA9+OEJexte3JeUnpykSR7oCLo9L4x5ChOcuNRdWwIDAQAB', 'message': 'success' }
})

// 登录
Mock.mock(/\/upms\/login/, 'POST', parameter => {
  return { 'code': 200, 'data': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NTUxOTQ4ODQsInVzZXJuYW1lIjoicm9vdCJ9.c8dd5adCzE2aqe-YhsG7HwE9uNX1WAkCQHWwJUE2VN0', 'message': 'success' }
})
// 获取用户信息
Mock.mock(/\/upms\/info/, 'get', parameter => {
  return { 'code': 200, 'data': { 'role': ['768d1ba5b9234e69aa500115340a2c11'], 'permissions': [], 'user': { 'birthday': 1594300342000, 'activeRoleId': '768d1ba5b9234e69aa500115340a2c11', 'gender': '1', 'org': { 'orgName': '121', 'orgCode': '123456' }, 'idCard': '350128199501241518', 'mmpd': 'e10adc3949ba59abbe56e057f20f883e', 'roles': [{ 'sortNo': 1, 'createBy': '测试基本信息', 'createTime': 1647935725000, 'updateBy': 'root', 'roleCode': 'admin', 'roleName': '管理员1', 'updateTime': 1647881902000, 'id': '768d1ba5b9234e69aa500115340a2c11', 'dataScope': '2', 'projectId': '95740e04e13b4971b8e8895a0cb893ac', 'status': 1 }], 'updateTime': 1647203307000, 'realname': '测试基本信息', 'createTime': 1592790803000, 'phone': '13165362563', 'updateBy': 'root', 'orgCode': '123456', 'id': '132', 'projectId': '95740e04e13b4971b8e8895a0cb893ac', 'email': 'root123@qq.com', 'status': '1', 'username': 'root' } }, 'message': 'success' }
})

// 获取字典
Mock.mock(/\/upms\/getDict/, 'get', parameter => {
  return { 'code': 200, 'data': { 'CONDITION_LIST': '[{"parentId":"d9fad1c92a26473bbf32a387c250b83a","dictType":"02","sortNo":1,"createBy":"zhangsan","createTime":1649485253000,"name":"小于","id":"8984c9da159d429ca7859b7aa5a8cf23","value":"<"},{"parentId":"d9fad1c92a26473bbf32a387c250b83a","dictType":"02","sortNo":2,"createBy":"zhangsan","createTime":1649485265000,"name":"小于等于","id":"224872bb78694cdfac7d9e951fd85079","value":"<="},{"parentId":"d9fad1c92a26473bbf32a387c250b83a","dictType":"02","sortNo":3,"createBy":"zhangsan","createTime":1649485277000,"name":"大于","id":"8dddf315c1df4f38ad01add04bcd2dcc","value":">"},{"parentId":"d9fad1c92a26473bbf32a387c250b83a","dictType":"02","sortNo":4,"createBy":"zhangsan","createTime":1649485301000,"name":"大于等于","id":"a481263da4fe45e9be7fb35b9d991559","value":">="},{"updateTime":1649758663000,"parentId":"d9fad1c92a26473bbf32a387c250b83a","dictType":"02","sortNo":5,"createBy":"zhangsan","createTime":1649485331000,"updateBy":"yyf","name":"等于","id":"5d0b4cee74494839880b2df301043020","value":"="},{"parentId":"d9fad1c92a26473bbf32a387c250b83a","dictType":"02","sortNo":6,"createBy":"zhangsan","createTime":1649485352000,"name":"不等于","id":"f037c2151ac24789b8c2849cdcfabdfc","value":"!="},{"parentId":"d9fad1c92a26473bbf32a387c250b83a","dictType":"02","sortNo":7,"createBy":"root","createTime":1649657807000,"name":"包含","id":"49a397c4e82c416cbd90e3ee3a836af3","value":"in"},{"parentId":"d9fad1c92a26473bbf32a387c250b83a","dictType":"02","sortNo":8,"createBy":"root","createTime":1649657903000,"name":"不包含","id":"ef4e240a24fc417c8997b94263ebd4d3","value":"not in"}]', 'AnalyseMethod': '[{"updateTime":1649991389000,"parentId":"42f22258df5948378d82288c7262a484","dictType":"02","sortNo":1,"createBy":"yyf","createTime":1649753576000,"updateBy":"zhangsan","name":"频数分布","id":"3b88ae90862e4b6fbbec017557a21a98","value":"PSFB"},{"updateTime":1649991395000,"parentId":"42f22258df5948378d82288c7262a484","dictType":"02","sortNo":2,"createBy":"yyf","createTime":1649753651000,"updateBy":"zhangsan","name":"算数平均及百分位数","id":"6d67fc7fbcbf4fb6b525354d6883683f","value":"SSPJHBFWS"},{"updateTime":1649991398000,"parentId":"42f22258df5948378d82288c7262a484","dictType":"02","sortNo":3,"createBy":"yyf","createTime":1649753696000,"updateBy":"zhangsan","name":"方差和标准差","id":"a2f020ddd33b453694aaa7c28efbbf45","value":"FCHBZC"}]', 'SEX_LIST': '[{"parentId":"0573361e9c1e4904921a0ca50a8644cd","dictType":"02","sortNo":1,"createBy":"root","createTime":1648631606000,"name":"男","id":"f4577218812748e88cb133dbaa2b6c7c","value":"1"},{"parentId":"0573361e9c1e4904921a0ca50a8644cd","dictType":"02","sortNo":2,"createBy":"root","createTime":1648631614000,"name":"女","id":"cf28e884e350439daceee9bdf8226e83","value":"2"}]' }, 'message': 'success' }
})

// 获取路由
Mock.mock(/\/upms\/getRouters/, 'get', parameter => {
  return {
    'code': 200,
    'data': [{
      'path': 'caseList',
      'components': {
        'default': 'layouts/RouteView',
        'CaseList': 'caseList/CaseList'
      },
      'hidden': false,
      'meta': { 'isLink': '0', 'keepAlive': '1', 'icon': '', 'title': '病例列表' },
      'name': 'CaseList',
      'id': '6bb6be0c4c8e45b3931387690f32e101',
      'type': '2',
      'projectId': '95740e04e13b4971b8e8895a0cb893ac',
      'status': '1'
    }],
    'message': 'success'
  }
})
// 退出登录
Mock.mock(/\/upms\/logout/, 'post', parameter => {
  return {
    'code': 200,
    'message': 'success'
  }
})
